Skip to content

Disable PublishTrimmed for Release so the release pipeline can publish#18

Merged
StuartMeeks merged 1 commit into
masterfrom
fix/disable-trimming-for-release
May 30, 2026
Merged

Disable PublishTrimmed for Release so the release pipeline can publish#18
StuartMeeks merged 1 commit into
masterfrom
fix/disable-trimming-for-release

Conversation

@StuartMeeks

@StuartMeeks StuartMeeks commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • The first release.yml run (tag v0.1.0-alpha.1) failed with NETSDK1144: Optimizing assemblies for size failed.
  • Trimming is on for Release in Snipdeck.App.csproj (template default). Three IL2026/IL2104 issues stack into a build break under TreatWarningsAsErrors:
    • JsonSerializer.{Deserialize,Serialize}Async in JsonSnipStore / JsonSettingsStore — the reflection-based overloads carry RequiresUnreferencedCodeAttribute.
    • Jdenticon-net, Microsoft.Windows.SDK.NET, and WinRT.Runtime each produce their own trim warnings.
  • Disables PublishTrimmed (always) for now. Self-contained binary will be larger, but the release pipeline can complete. Re-enabling is the proper follow-up (move JSON onto JsonSerializerContext source-gen + audit third-party warnings) — adding that to TODO.md in a separate PR.

Notes

  • The orphaned v0.1.0-alpha.1 tag exists on the remote but has no associated GitHub release (the workflow failed before the release-creation step). I'll delete the tag, then re-cut from master after this PR lands.

Test plan

  • Local build of Core stays clean (this is a publish-property change, no source touched).
  • Re-cut tag triggers a green release run.

🤖 Generated with Claude Code

The first release run failed with NETSDK1144 (Optimizing assemblies for
size failed). Root cause: trimming is on for Release configurations,
and three trim issues add up to a build break under TreatWarningsAsErrors:

- IL2026 on JsonSerializer.{Deserialize,Serialize}Async in JsonSnipStore
  and JsonSettingsStore — the reflection-based overloads carry
  RequiresUnreferencedCodeAttribute.
- IL2104 from Jdenticon-net, Microsoft.Windows.SDK.NET, and
  WinRT.Runtime, which all produce trim warnings of their own.

Switching PublishTrimmed off unblocks the release. Re-enabling is
captured in TODO.md as the proper follow-up — it wants JsonSerializer
to move onto a source-generated JsonSerializerContext plus an audit of
the third-party trim warnings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit b4c1e5e into master May 30, 2026
4 checks passed
@StuartMeeks StuartMeeks deleted the fix/disable-trimming-for-release branch May 30, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant